<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--author: AGolubinskyy -->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:desk="http://desk.com"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Service desk</title>
        <link rel="stylesheet" type="text/css" href="resources/params.css"/>
    </h:head>
    <h:body style="background-color: #c1d5e0;">
        <desk:header/>
        <h:form styleClass="regForm">
            <h:panelGrid columns="3" columnClasses="regInputInfo,regInput,regErrors">

                <h:outputText value="Login"/>
                <p:inputText value="#{loginBean.login}" required="true" id="login" 
                             requiredMessage="Please enter your login"/>
                <p:message for="login"/>

                <h:outputText value="Password"/>
                <p:password value="#{loginBean.password}" required="true" id="password" 
                            requiredMessage="Please enter your password" 
                            validatorMessage="Password should be at least 3 characters length"
                            feedback="false"
                            minLength="3">
                    <f:validateLength minimum="3"/>
                </p:password>
                <p:message for="password"/>

                <h:outputText/>
                <h:commandButton value="Log in"  action="#{loginBean.authorize}" styleClass="regInput"/>

            </h:panelGrid>
            <p:messages globalOnly="true"/>
        </h:form>
    </h:body>
</html>
